package BLLocationCallbacker;

import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.movecar.utils.Converter;
/**
 * 获取位置监听
 * 
 * @author Zhao.JQ
 *
 */
public class BLLocationListener implements BDLocationListener {

	private final BLLocationCallbacker activity;

	public BLLocationListener(final BLLocationCallbacker activity) {
		this.activity = activity;
	}

	@Override
	public void onReceiveLocation(final BDLocation arg0) {
		activity.onLocation(Converter.locationToGeoPoint(arg0),arg0.getProvince() == null ? null : arg0.getProvince().substring(0, 2) + "-" + arg0.getCity());
	}

	@Override
	public void onReceivePoi(final BDLocation arg0) {
	}
}